﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebDemoEdit.aspx.cs" Inherits="Form_WebDemoEdit" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>ECG示例录入</title>
    <base target="_self" />
    <script language="javascript" type="text/javascript" src="../JS/ChkInputs.min.js"></script>
    <script src="../JS/My97DatePicker/WdatePicker.js" type="text/javascript" defer="defer"></script>
    <script language="javascript" type="text/javascript">
        //检测关闭或刷新页面
        var isClose = false;
        function CheckCose() {
            if (event.clientY < 20) {
                isClose = true;
            }
        }
        //关闭页面
        function CloseAddPage() {
            if (isClose) {
                var isAdd = document.getElementById("hidSave").value;
                if (isAdd == "1") {
                    try {
                        window.returnValue = "1";
                        window.close();
                    }
                    catch (e) {
                        window.close();
                    }
                }
            }
        }
        //验证页面所有元素
	    function CheckAll()
	    {
		    return verifyAll(document.getElementById("form1"));
	    }
	    //预处理控件的即时功能
	    function onLoadFun()
	    {
		    loadAllChkInputs($("form1"));
	    }
    </script>
</head>
<body onload="onLoadFun()" onbeforeunload="CheckCose()" onunload="CloseAddPage()">
    <form id="form1" runat="server">
    <center>
        <table width="800px" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="4">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="left">字符串:</td>
                <td align="left">
                    <asp:TextBox ID="txtString" chinese="字符串" nullable="no" maxsize="100" notmatchclass="notvalidclass1" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">填写日期:</td>
                <td align="left">
                    <asp:TextBox ID="txtDate" chinese="填写日期" nullable="no" maxsize="10" notmatchclass="notvalidclass1" datatype="date" comparecurrent="3" ischeckinstant="false" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                    <!-- ContentEditable="false" -->
                </td>
            </tr>
            <tr>
                <td align="left">名称:</td>
                <td align="left">
                    <asp:TextBox ID="txtName" chinese="名称" nullable="no" maxsize="100" notmatchclass="notvalidclass1" showmenu="1" notcheckvaluerange="true" valuerange="张三|李四|王二|小明|Tom|Tommy" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">身份证号:</td>
                <td align="left">
                    <asp:TextBox ID="txtIDCard" chinese="身份证号" nullable="no" maxsize="20" notmatchclass="notvalidclass1" datatype="idcard" showmenu="2" valuerange="必填字段，中华人民共和国身份证号码" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
            </tr>
            <tr>
                <td align="left">字符串A:</td>
                <td align="left">
                    <asp:TextBox ID="txtStringA" chinese="字符串A" nullable="no" maxsize="100" notmatchclass="notvalidclass1" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">字符串B:</td>
                <td align="left">
                    <asp:TextBox ID="txtStringB" chinese="字符串B" maxsize="100" notmatchclass="notvalidclass1" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left">电子邮件:</td>
                <td align="left">
                    <asp:TextBox ID="txtEMail" chinese="电子邮件" nullable="no" maxsize="100" notmatchclass="notvalidclass1" datatype="regular" regexpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" notmatchinfo="必须是电子邮件格式！" showmenu="1" notcheckvaluerange="true" valuerange="lxchutao@163.com|aa@aa.com|xx@yy.com|ss@ss.cc|ss@ss.com" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">整数:</td>
                <td align="left">
                    <asp:TextBox ID="txtInt" chinese="整数" nullable="no" maxsize="5" notmatchclass="notvalidclass1" datatype="int" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
            </tr>
            <tr>
                <td align="left">正整数:</td>
                <td align="left">
                    <asp:TextBox ID="txtIntA" chinese="正整数" nullable="no" maxsize="5" notmatchclass="notvalidclass1" datatype="number" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">负整数:</td>
                <td align="left">
                    <asp:TextBox ID="txtIntB" chinese="负整数" maxsize="5" notmatchclass="notvalidclass1" datatype="int" maxvalue="0" notequalmax="true" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left">浮点数:</td>
                <td align="left">
                    <asp:TextBox ID="txtFloat" chinese="浮点数" nullable="no" maxsize="10" notmatchclass="notvalidclass1" datatype="float" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
                <td align="left">正浮点数:</td>
                <td align="left">
                    <asp:TextBox ID="txtFloatA" chinese="浮正浮点数点数" nullable="no" maxsize="10" notmatchclass="notvalidclass1" datatype="float" minvalue="0" notequalmin="true" runat="server"></asp:TextBox><font color="#FF0000">*</font>
                </td>
            </tr>
            <tr>
                <td align="left">负浮点数:</td>
                <td align="left">
                    <asp:TextBox ID="txtFloatB" chinese="负浮点数" maxsize="10" notmatchclass="notvalidclass1" datatype="float" maxvalue="0" notequalmax="true" runat="server"></asp:TextBox>
                </td>
                <td align="left"></td>
                <td align="left"></td>
            </tr>
            <tr>
                <td align="center" colspan="4">
                    <asp:Button ID="btnSave" runat="server" Text="保存" Width="60px" OnClientClick="return CheckAll();" OnClick="btnSave_Click" />
                    <asp:Button ID="btnCreate" runat="server" Text="再写一条" Width="80px" Visible="false" OnClick="btnCreate_Click" />
                </td>
            </tr>
        </table>
        <div style="display: none;">
            <input runat="server" id="hidSave" value="0" />
        </div>
    </center>
    </form>
</body>
</html>
